// bookgo/wtlibrary/myactivity/myactivity.js
var server = require('../../../utils/server.js');
Page({

    /**
     * 页面的初始数据
     */
    data: {
        left: "6%",
        navId: 0,
        winHeight: 0,
        allList:[],
        applyList:[],
        beginList:[],
        endList:[],
        violationList:[],

    },
    // 导航栏
    navClick: function (e) {
        var that = this;
        var left = "";
        var num = e.currentTarget.dataset.id;
        console.log("num++++", num);
        if (num == 0) {
            left = "6%";
        } else if (num == 1) {
            left = "26%";
        } else if (num == 2) {
            left = "46%";
        } else if (num == 3) {
            left = "66%";
        } else if (num == 4) {
            left = "86%";
        }
        this.setData({
            left: left,
            navId: num,

        })
    },
    bindChange: function (e) {
        console.log(e);
        var that = this;
        var num = e.detail.current;

        console.log("bindchange+", num);
        var left = "";
        if (num == 0) {
            left = "6%";
        } else if (num == 1) {
            left = "26%";
        } else if (num == 2) {
            left = "46%";
        } else if (num == 3) {
            left = "66%";
        } else if (num == 4) {
            left = "86%";
        }

        that.setData({
            left: left,
            navId: num
        })


    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        var that = this;
        wx.getSystemInfo({
            success: function (res) {
                that.setData({
                    winHeight: res.windowHeight
                });
            }
        });
    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {
    
    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {
    
    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {
    
    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {
    
    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {
    
    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {
    
    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {
    
    }
})